<template>

    <!-- 添加或修改对话框 -->
    <lam-dialog :title="title" :visible.sync="open" width="700px" append-to-body @close="cancel">
      <el-form :ref="formRef" :model="form" :rules="rules" label-width="120px" :loading="loading" :disabled="formDisabled">
        <el-row>
          <el-col :span="12">
            <el-form-item label="登录账号" >
              <span v-if="form.curUser" ><el-tag>{{ form.username }}</el-tag></span>
              <span v-else>{{form.username}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="昵称" >
              <span>{{form.nickName}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="用户姓名" >
              <span>{{form.realname}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="操作端">
              <span>{{form.operatorTypeDictText}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12" v-if="form.operatorType=='f'">
            <el-form-item label="当前操作公司">
              <span>{{form.curCompanyCodeDictText}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="性别" >
              <span>{{form.sexDictText}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="邮箱" >
              <span>{{form.email}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="电话" >
              <span>{{form.phone}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="状态" >
              <UserStatus :value="form.status" :text="form.statusDictText" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="用户类型" >
              <span>{{form.userTypeDictText}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="登录时间" >
              <span>{{form.loginTimeStr}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="在线时长" >
              <span>{{form.onlineTimeStr}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="过期时间" >
              <span>{{form.expiresAtStr}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="token有效时长" >
              <span>{{form.expireTimeStr}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="登录IP" >
              <span>{{form.ipaddr}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="客户端" >
              <span>{{form.browser}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="操作系统" >
              <span>{{form.os}}</span>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <template slot="footer">
        <el-button key="back" @click="cancel">关  闭</el-button>
      </template>
    </lam-dialog>

</template>

<style scoped>
  .el-form-item {
      margin-bottom: 0px;
  }
</style>

<script>
import { EditMixin } from '@/components/mixins/EditMixin';

export default {
  name: "UserOnlineInfo",
  mixins:[EditMixin],
  data() {
    return {
    };
  },
  created() {
  },
  methods: {

  }
};
</script>
